package cn.kust.clock.pojo.vo;

import cn.kust.clock.pojo.entity.Clock;
import cn.kust.clock.pojo.entity.Image;
import cn.kust.microtourismcommon.pojo.dto.UserNameAvatar;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @author bjs
 * @date 2022/7/21 0021  9:01
 **/
@Data
@NoArgsConstructor
public class ClockVO {
    private Long id;//打卡id

    private Object user;

    private String title;//打卡标题

    private LocalDateTime gmtCreate;//创建时间

    private LocalDateTime gmtModified;//修改时间

    private Image image;//封面图片

    private Integer likeNum;//点赞数

    public ClockVO(Clock clock,Object userNameAvatar, Image image, Integer likeNum) {
        this.id = clock.getId();
        this.user = userNameAvatar;
        this.title = clock.getTitle();
        this.gmtCreate = clock.getGmtCreate();
        this.gmtModified = clock.getGmtModified();
        this.image = image;
        this.likeNum = likeNum;
    }
}
